package com.itheima.mapper;

import com.itheima.pojo.Emp;
import com.itheima.pojo.EmpQueryParam;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 员工持久层接口
 * @author GY
 * @version V1.0
 * @date 2025-01-12 9:05
 */
@Mapper
public interface EmpMapper {

    List<Emp> findPage(EmpQueryParam empQueryParam);

    void insert(Emp emp);

    List<Emp> findAll();

    void deleteByIds(@Param("ids") List<Integer> ids);

    Emp findByIdAndExprList(Integer id);

    void updateEmp(Emp emp);

    @MapKey("job")
    List<Map<String, Object>> empFindByJob();

    @MapKey("name")
    List<Map<String, Object>> empFindByGender();

    Emp selectByUser(String username);
}
